﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using TinyTeam.UI;
using UnityEngine.SceneManagement;

public class LoginUI : TTUIPage
{
    public LoginUI() : base(UIType.Normal, UIMode.HideOther, UICollider.Normal)
    {
        uiPath = "UI/LoginUI";
    }
    public override void Awake(GameObject go)
    {
        go.transform.Find("InputUserName").GetComponent<InputField>();
        go.transform.Find("EnterButton").GetComponent<Button>().onClick.AddListener(EnterBtn);
        go.transform.Find("SetButton").GetComponent<Button>().onClick.AddListener(SetBtn);
    }
    //进入游戏
    public void EnterBtn()
    {
        ShowPage<LoadUI>();
        ClosePage<LoginUI>();
        SceneManager.LoadScene("2");

    }
    //设置游戏
    public void SetBtn()
    {
        ShowPage<SetUI>();
    }  
}
